﻿@model ProjectBordspil.Models.MyViewModel

@{
    ViewBag.Title = "MyPage";
}
<h2 class="InfoHeader">Mín Síða</h2>

<div id="MyPageDiv">
    <p>Notandanafn: @Model.myStatus.userName </p>
    <p>Stig í Samstæðuleik: @Model.myStatus.scoreMem</p>
    <p>Stig í Höggstokk: @Model.myStatus.scoreGui</p>
</div>
<div id="DivMyTable">  
<h2 class="H2MyGames ">Mínir Leikir</h2>
        <table id="MyGames">
            <tbody>
                <tr >
                    <th class="ActiveHead">Nafn á leik</th>
                    <th class="ActiveHead">Borðspil</th>
                    <th class="ActiveHead" >Fjöldi leikmanna</th>
                    <th class="ActiveHead" >Leikmaður 1 </th>
                    <th class="ActiveHead" >Leikmaður 2 </th>
                </tr>
                @foreach (var game in Model.myGame)
                {
                    if (!game.finished)    
                    {    
                        <tr  class="GameNr">
                            <td class="ActionLinkCss">@Html.ActionLink(game.name, "ShowMemGame", "Game", new { id = game.id }, null)</td>
                            <td>@game.typeOfGame</td>
                            <td>@game.NumberOfPlayers</td>
                            <td>@game.user1</td>
                            <td>@game.user2</td>
                        </tr>
                    }
                }
            </tbody>
        </table>
 </div> 